package so.ifl.servcie.impl;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import so.ifl.dao.CoachCardInfoDao;
import so.ifl.servcie.CoachCardService;
import so.ifl.vo.CoachCardVo;

/**
 *create by aaron.lu
 *create at 2013-2-27 下午11:16:12
 *<mailto: atyuan.lu@gmail.com>
 **/
@Service("coachCardService")
public class CoachCardServiceImpl implements CoachCardService {

	@Autowired
	private CoachCardInfoDao coachCardInfoDao;
	
	@Override
	public List<CoachCardVo> queryCoachCardWithParamAndPagination(
			Map<String, Object> params, Integer offset, Integer limit) {

		return coachCardInfoDao.queryCoachCardWithParamAndPagination(params, new RowBounds(offset, limit));
	}

	@Override
	public Integer countCoachCardWithParam(Map<String, Object> params) {

		return coachCardInfoDao.countCoachCardWithParam(params);
	}

	@Override
	public void insertCoachCard(CoachCardVo coachCardVo) {
		coachCardInfoDao.insertCoachCard(coachCardVo);

	}

	@Override
	public void updateCoachCard(CoachCardVo coachCardVo) {
		coachCardInfoDao.updateCoachCard(coachCardVo);

	}

	@Override
	public void deleteCoachCard(Integer coachCardId) {
		coachCardInfoDao.deleteCoachCard(coachCardId);

	}

}
